﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Microsoft.AspNetCore.Builder;
using NFinal.Middleware.Proxy;

namespace NFinal.Middleware.ProxyTest
{
    public class Startup
    {
        public void Configure(IApplicationBuilder app)
        {
            ///本地请求代理配置
            ProxyConfig config = new ProxyConfig()
            {
                Proxs = new Proxy.Proxy[] {
                    //远程服务器
                    new Proxy.Proxy(){
                        urlPrefix= "/more",
                        url="http://www.baidu.com"
                    }
                }
            };
            app.UseMiddleware<NFinal.Middleware.Proxy.CoreProxyMiddleware>(config);
        }
    }
}
